<template>
  <div class="lcd-design-view">
    <ul class="lcd-dv-header">
      <li style="float: left; width: 195px; text-align: center">
        <img src="/img/logo.png" width="36" height="36" style="vertical-align: -12px; cursor: pointer" @click="$router.push('/')"/>
        <span style="font-size: 18px; color: #000000; margin-left: 10px;">低代码设计平台</span>
      </li>
      <li v-if="$route.path=='/lcd/design'" style="float: right; min-width: 300px; text-align: center">
        <span style="margin-left: 12px; padding-right: 32px">
          <ivz-icon title="sql管理" type="iz-icon-sql" :style="{fontSize: '20px', cursor: 'pointer'}" @click="sqlClickHandle" />
          <ivz-icon title="保存" type="iz-icon-submit" :style="{fontSize: '22px', marginLeft: '10px', cursor: 'pointer'}" @click="submitHandle" />
        </span>
      </li>
    </ul>
    <AModal v-model:visible="sqlVisible">

    </AModal>
    <div class="lcd-dv-body">
      <router-view />
    </div>
  </div>
</template>

<script>
import {mapGetters, mapMutations} from "vuex";

export default {
  name: "index",
  setup() {
    return {}
  },
  computed: {
    ...mapGetters(['sqlVisible'])
  },
  methods: {
    ...mapMutations(['switchSqlVisible']),
    previewHandle(meta) {
      this.$msg.warningMessage("暂不支持的操作", 1.5);
    },
    sqlClickHandle() {
      this.switchSqlVisible(true);
    },
    submitHandle() {
      this.$msg.warningMessage("暂不支持");
    }
  }
}
</script>

<style scoped>
.lcd-design-view {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  display: -ms-flex;
  display: -webkit-flex;
  flex-direction: column;
  justify-content: space-between;
}
.lcd-dv-header {
  height: 52px;
  margin: 0px;
  padding: 0px;
  list-style: none;
  line-height: 52px;
  box-shadow: 0px 1px 4px 1px #cccccc;
}
.lcd-dv-body {
  height: 100%;
  margin-top: 8px;
  overflow-y: auto;
}
</style>